<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>


<style type="text/css">
/* 赚取金豆 */
.topBox {
	background-image: url('<c:url value='/images/we/activity/tasktopbackground.jpg ' />');
	background-size: 100% 100%;
	padding-top: 40px;
}

.topImg {
	width: 80px;
	height: 60px;
}

.icon_img {
	width: 40px;
	height: 40px;
	padding-right: 10px;
}

.hasNum {
	width: 50%;
	height: 3px;
	background-color: #dbaf58;
}
.num {
	position: absolute;
	left: 1%;
	display: inline-block;
	background-image: url('<c:url value='/images/we/activity/border.png' />');
	background-size: 100% 100%;
	color: #dbaf58;
	width: 45px;
	padding: 10px;
	padding-bottom: 5px;
	text-align: center;
}

</style>
<input type="hidden" id="goldenBeanPercent" value="<fmt:formatNumber type="percent" minFractionDigits="0" value=" ${taskGoldenBean.goldenBean/10000} " />"/>

<div class="topBox">
	<div style="text-align: center;">
		<div class="weui-flex">
			<div class="weui-flex__item type-item">
				<img class="topImg" alt="" src="<c:url value='/images/we/activity/chuangke.png' />">
			</div>
			<div class="weui-flex__item type-item">
				<img class="topImg" alt="" src="<c:url value='/images/we/activity/yinpaichuanke.png' />">
			</div>
			<div class="weui-flex__item type-item">
				<img class="topImg" alt="" src="<c:url value='/images/we/activity/jinpaichuanke.png' />">
			</div>
		</div>
	</div>

	<div style="text-align: center;">
		<div class="allNum">
			<div class="hasNum"></div>
		</div>
	</div>
	<div style="text-align: center;">
		<div class="weui-flex"  style="color: #dbaf58;">
			<div class="weui-flex__item type-item">
				<p>0</p>
			</div>
			<div class="weui-flex__item type-item">
				<p>5000</p>
			</div>
			<div class="weui-flex__item type-item">
				<p>10000</p>
			</div>
		</div>
	</div>
	<div class="weui-flex" style="color: #dbaf58;">
			<div class="weui-flex__item type-item" style="padding-left: 20px">
				<p>金豆数：${taskGoldenBean.goldenBean}</p>
			</div>
			<div class="weui-flex__item type-item" style="padding-left: 20px">
				<p>今日排名： ${taskGoldenBean.sort}</p>
			</div>
	</div>
	<div style="text-align: right; color: #ffffff; padding: 5px; margin-top: 0.5rem"></div>
</div>

<div class="weui-cell">
	<div class="weui-cell__hd"></div>
	<div class="weui-cell__bd">
		<p class="color_blue">每日任务</p>
	</div>
</div>

<c:if test="${!empty dayActiTasks}">
	<c:forEach items="${dayActiTasks}" var="dayActiTasks">
		<div class="weui-cell">
			<div class="weui-cell__hd">
				<img class="icon_img" src="<c:url value='${tfn:getFileUrl(dayActiTasks.iconImg)}' />">
			</div>
			<div class="weui-cell__bd">
				<p class="font_bold">${dayActiTasks.taskName}</p>
				<p class="color_red">
					+${dayActiTasks.reward}
					<t:provider packageName="ser" enumClassName="GoodsCurrencyState" value="${dayActiTasks.rewardCurrency}" />
				</p>
			</div>
			<c:if test="${dayActiTasks.taskFinished=='true'}">
				<a class="weui-cell__ft avtiveBtn " href="<c:url value='#' />"> 已达成 </a>
			</c:if>
			<c:if test="${dayActiTasks.taskFinished=='false'}">
				<a class="weui-cell__ft avtiveBtn avtiveBtn_active" href="<c:url value='${dayActiTasks.taskUrl}' />"> 去达成</a>
			</c:if>
		</div>
	</c:forEach>
</c:if>

<div style="height: 10px; background-color: #f5f5f5"></div>
<div class="weui-cell">
	<div class="weui-cell__hd"></div>
	<div class="weui-cell__bd">
		<p class="color_blue">每周任务</p>
	</div>
</div>
<c:if test="${!empty weekActiTasks}">
	<c:forEach items="${weekActiTasks}" var="weekActiTasks">
		<div class="weui-cell">
			<input type="hidden" name="ceshi" id="ceshi" value="${weekActiTasks.taskUrl}" />
			<div class="weui-cell__hd">
				<img class="icon_img" src="<c:url value='${tfn:getFileUrl(weekActiTasks.iconImg)}' />">
			</div>
			<div class="weui-cell__bd">
				<p class="font_bold">${weekActiTasks.taskName}</p>
				<p class="color_red">
					+${weekActiTasks.reward}
					<t:provider packageName="ser" enumClassName="GoodsCurrencyState" value="${weekActiTasks.rewardCurrency}" />
				</p>
			</div>
			<c:if test="${weekActiTasks.taskFinished=='true'}">
				<a class="weui-cell__ft avtiveBtn" href="<c:url value='#' />"> 已达成 </a>
			</c:if>
			<c:if test="${weekActiTasks.taskFinished=='false'}">
				<a class="weui-cell__ft avtiveBtn avtiveBtn_active" href="<c:url value='${weekActiTasks.taskUrl}' />"> 去达成</a>
			</c:if>
		</div>
	</c:forEach>
</c:if>

<div style="height: 10px; background-color: #f5f5f5"></div>
<div class="weui-cell">
	<div class="weui-cell__hd"></div>
	<div class="weui-cell__bd">
		<p class="color_blue">每月任务</p>
	</div>
</div>

<c:if test="${!empty monthActiTasks}">
	<c:forEach items="${monthActiTasks}" var="monthActiTasks">
		<div class="weui-cell">
			<input type="hidden" name="ceshi" id="ceshi" value="${monthActiTasks.taskUrl}" />
			<div class="weui-cell__hd">
				<img class="icon_img" src="<c:url value='${tfn:getFileUrl(monthActiTasks.iconImg)}' />">
			</div>
			<div class="weui-cell__bd">
				<p class="font_bold">${monthActiTasks.taskName}</p>
				<p class="color_red">
					+${monthActiTasks.reward}
					<t:provider packageName="ser" enumClassName="GoodsCurrencyState" value="${monthActiTasks.rewardCurrency}" />
				</p>
			</div>
			<c:if test="${monthActiTasks.taskFinished=='true'}">
				<a class="weui-cell__ft avtiveBtn" href="<c:url value='#' />"> 已达成 </a>
			</c:if>
			<c:if test="${monthActiTasks.taskFinished=='false'}">
				<a class="weui-cell__ft avtiveBtn avtiveBtn_active" href="<c:url value='${monthActiTasks.taskUrl}' />"> 去达成</a>
			</c:if>
		</div>
	</c:forEach>
</c:if>


<script type="text/javascript"> 
$(function () {
	var goldenBean = $("#goldenBeanPercent").val();
	$(".hasNum").width(goldenBean);
})
</script>

